package com.leigang.java.code.design.mode.observer.display;

import com.leigang.java.code.design.mode.observer.Observer;

/**
 * 具体的Observer实现
 */
public class ZfbDisplay implements Observer {
    private final String name;

    public ZfbDisplay(String name) {
        this.name = name;
    }
    
    @Override
    public void update(String weather) {
        System.out.println(name + " 收到天气更新: " + weather);
    }
}
